package com.qdairlines.entity.log;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author pangyannan
 * @date 2017年4月17日
 * @company QingDao Airlines
 * @description 日志记录格式
 */
public class Log {
	private String id;
	private String workcode; //工号
	private String requestpath; //请求地址
	private String requestip;//请求ID
	private String inputparam; //请求参数
	private String packagename; //包名
	private String methodname; //方法名
	private String createtime; //创建日期
	private String type; //update、delete、insert

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getWorkcode() {
		return workcode;
	}

	public void setWorkcode(String workcode) {
		this.workcode = workcode;
	}

	public String getRequestpath() {
		return requestpath;
	}

	public void setRequestpath(String requestpath) {
		this.requestpath = requestpath;
	}

	public String getRequestip() {
		return requestip;
	}

	public void setRequestip(String requestip) {
		this.requestip = requestip;
	}

	public String getInputparam() {
		return inputparam;
	}

	public void setInputparam(String inputparam) {
		this.inputparam = inputparam;
	}

	public String getPackagename() {
		return packagename;
	}

	public void setPackagename(String packagename) {
		this.packagename = packagename;
	}

	public String getMethodname() {
		return methodname;
	}

	public void setMethodname(String methodname) {
		this.methodname = methodname;
	}

	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Log(String workcode, String requestpath, String requestip,
			String inputparam, String packagename, String methodname,
			String createtime, String type) {
		super();
		this.workcode = workcode;
		this.requestpath = requestpath;
		this.requestip = requestip;
		this.inputparam = inputparam;
		this.packagename = packagename;
		this.methodname = methodname;
		this.createtime = createtime;
		this.type = type;
	}

	public Log() {
		super();
	}
	
	@Override
	public String toString(){
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}
}
